/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package server.process;

import java.util.List;
import javax.ejb.Local;
import server.entity.Comment;
import server.entity.Photo;
import server.entity.RegisteredUser;

/**
 *
 * @author Hoang
 */
@Local
public interface ProcessBeanLocal {

    public boolean createNewCollection(java.lang.String collectionName, java.lang.String description, java.lang.String userName, boolean admin,java.lang.String Image) throws javax.ejb.CreateException, javax.ejb.ObjectNotFoundException;

    public boolean LogAdminCreateCategory(java.lang.String Categorynane);

    public boolean CheckUpdatecategory(java.lang.String CollectiId, java.lang.String Collecname, java.lang.String description, java.lang.String ruusername, boolean admin, java.lang.String Image) throws javax.ejb.ObjectNotFoundException;

    public boolean removeCategory(java.lang.String CategoryID, java.lang.String username, boolean admin) throws javax.ejb.RemoveException, javax.ejb.ObjectNotFoundException;

    public boolean CheckDeleteComment(int id);
   
    public boolean CheckUpdateComment(int commentid, java.lang.String email, java.lang.String username123, java.lang.String content123, int photoIDasd, boolean approved,boolean sratus);

    public boolean AddFAQ(java.lang.String question123, java.lang.String anawers123);

    public boolean checkDeletefaq(int faqid);

    public boolean CheckUpdateFaq(int idfaq, java.lang.String question123, java.lang.String answers123);

    public boolean CheckLogin(java.lang.String username123, java.lang.String password123);

    public boolean LogAdminlogin();

    public boolean login(java.lang.String name, java.lang.String pass);

    public boolean ChangePassWordAdmin(java.lang.String name, java.lang.String OldPass, java.lang.String NewPass);

    public boolean ChangePassUser(java.lang.String name, java.lang.String oldpass, java.lang.String newpass);

    public java.util.List SearchUserByUserName(java.lang.String nameSearch);

    public boolean ActiveUser(java.lang.String name);

    public boolean LogUser(java.lang.String UserName);

    public server.entity.RegisteredUser OneUser(java.lang.String name);

    public boolean UserUpdate(java.lang.String username, java.lang.String firstName, java.lang.String lastName, java.lang.String Address, java.lang.String phone, java.lang.String email);

    public java.util.List reportCommentPhoto(java.lang.String fromDate, java.lang.String toDate);

    public server.entity.Category[] ShowAdminCategory(java.lang.String user, boolean admin);

    public server.entity.Faq[] ShowAllfaq();

    public server.entity.ViewPhoto[] CheckReportViewPhoto(java.lang.String date123);

    public List<Photo> reportTop10PhotobyView(java.lang.String fromdate, java.lang.String todate);

    public server.entity.Comment[] SearchLikeComment(int id123);

    public boolean AddAdminLog(java.lang.String action);

    public java.util.List ListAllUser();

    public server.entity.RegisteredUser findUserbyID(java.lang.String username);

    public server.entity.Category[] getListCollection(java.lang.String user, boolean admin) throws javax.ejb.ObjectNotFoundException, java.lang.RuntimeException;

    public server.entity.Category findbyCollectionID(java.lang.String CollectionID) throws javax.ejb.ObjectNotFoundException;

    public server.entity.Category[] getPublicCollection() throws javax.ejb.FinderException;

    public void viewPhoto(int photoID);

    public List<Photo> getTopCommentPhoto();

    public boolean updateImage(java.lang.String username, int photoID, java.lang.String Descriptions, java.lang.String tag) throws javax.ejb.ObjectNotFoundException, javax.ejb.EJBAccessException, java.lang.RuntimeException;

    public void downloadPhoto(int photoID);

    public boolean checkLogin(java.lang.String username, java.lang.String password) throws javax.ejb.ObjectNotFoundException, java.lang.RuntimeException;

    public java.lang.String getName(java.lang.String username);

    public List<ImageViewReport> reportTop10ImageView(java.lang.String fromDate, java.lang.String toDate);

    public List<UserUploadImageReport> reportTop10UserUpload(java.lang.String fromDate, java.lang.String toDate);

    public server.entity.AdminLog[] filterHistory(java.sql.Date fromdate, java.sql.Date todate);

    public server.entity.AdminLog[] listHistory();

    public server.entity.Photo searchbyID(int photoID);

    public List<Photo> getTopViewedPhoto();

    public boolean removePhoto(int photoID, java.lang.String username) throws javax.ejb.ObjectNotFoundException, javax.ejb.RemoveException;

    public server.entity.Photo getPhotobyID(int photoID) throws javax.ejb.ObjectNotFoundException;

    public boolean insertNewPhoto(java.lang.String photoName, java.lang.String serverFile, java.lang.String description, java.lang.String tag, java.lang.String username, java.lang.String collectionID) throws javax.ejb.ObjectNotFoundException, javax.ejb.CreateException, server.process.LimitationException;

    public boolean Updatecategory(java.lang.String CollectiId, java.lang.String Collecname, java.lang.String description, java.lang.String ruusername, boolean admin, java.lang.String Image) throws javax.ejb.ObjectNotFoundException;

    public server.entity.AdminLog[] ShowAllAdminLog();

    public server.entity.Comment[] ShowAllComment();

    public boolean AddComment(java.lang.String email, java.lang.String user, java.lang.String conntent, int photoid, boolean approved,boolean staus);

    public java.lang.Boolean insertContest(java.lang.String name, java.lang.String content, java.lang.String requirement, java.lang.String formDate, java.lang.String toDate, boolean status);

    public java.util.List viewAllContest();

    public java.lang.Boolean updateContest(int id, java.lang.String name, java.lang.String content, java.lang.String fromDate, java.lang.String toDate, boolean status);

    public java.util.List viewRegContest();

    public java.lang.Boolean registryContest(boolean regStatus, int idContest, java.lang.String username);

    public java.util.List ViewAllImage(int idContest);

    public java.util.List searchImageOfUser(java.lang.String username, int idContest);

    public java.lang.Boolean vote(java.lang.String username, int idImgContest, int mark, java.lang.String voteComment, java.sql.Date voteDate);

    public java.util.List viewUpload(java.lang.String username, int idContest);

    public java.lang.Boolean uploadImage(java.lang.String infoImage, java.lang.String image, java.lang.String date, java.lang.String username, int idContest);

    public java.util.List viewVote(java.lang.String username, int idContest);

    public java.util.List createReport(int idContest);

    public java.util.List reportTopContest(java.sql.Date fromDate, java.sql.Date toDate, int idContest);

    server.entity.Comment[] SearchCommentID(int photoid);

    server.entity.Comment[] businessMethod(boolean dasdsa);

    boolean CheckUppdasd(String id, String sstus);

    public server.entity.Comment[] getListComment(int photoID);

    public java.util.List<server.entity.Photo> getListPhoto();

    public boolean insertNewPhotoAdmin(java.lang.String photoName, java.lang.String serverFile, java.lang.String description, java.lang.String tag, java.lang.String username, java.lang.String collectionID, boolean status) throws javax.ejb.ObjectNotFoundException, javax.ejb.CreateException, server.process.LimitationException;

    List listphotobyCategoryID(String categoryID);

    boolean activeStatusPhoto(String id);

    public boolean logStatusPhoto(java.lang.String id);

    public boolean isCategoryNameExist(java.lang.String Catname, java.lang.String username, boolean admin);

    public java.util.List<server.entity.Photo> getListPhotoByCategory(java.lang.String catID, java.lang.String username) throws server.process.LimitationException;

    public java.util.List<server.entity.Photo> searchPhotobyName(java.lang.String name);

    public boolean removePhoto(java.lang.String username, int photoID) throws server.process.LimitationException;

    public java.util.List<server.entity.Photo> searchMyPhotoInCategory(java.lang.String category, java.lang.String username, java.lang.String imagename) throws server.process.LimitationException;
    
}
